package com.icss.OA;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.util.Arrays;


@MapperScan(basePackages = "com.icss.OA.dao")
@SpringBootApplication
public class OaApplication implements CommandLineRunner {

	public static void main(String[] args) {
		SpringApplication.run(OaApplication.class, args);
	}

	@Autowired
	ApplicationContext context;

	@Override
	public void run(String... args) throws Exception {

//		String[] beans = context.getBeanDefinitionNames();
//		Arrays.asList(beans).forEach(item -> {
//			System.out.println(item + "@@" + context.getBean(item));
//		});
	}
}
